<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			//遍历数组的时间复杂度是多少？遍历二维数组呢？
		let gs = [
			['苹果','香蕉','梨子','圣女果','哈密瓜','西瓜','榴莲'],
			['西兰花','青菜','白菜','花菜','韭菜','黄瓜','茄子']
			];			
			for (let i = 0, len = gs.length; i < len; i++) {
				
				if (i == 0) {
					document.write("水果");
					document.write("<br />")
					document.write("<br />")
				}
				if (i == 1) {
					document.write("<br />")
					document.write("<br />")
					document.write("蔬菜");
					document.write("<br />")
					document.write("<br />")
				}
				
				for (let j = 0, l = gs[i].length; j < l; j++) {
					document.write(" "+gs[i][j]);
					document.write("<br />")
				}
			}
			
		
		</script>
	</body>
</html>
